import Vue from 'vue'
import App from './App.vue'
import elementUI from "element-ui"
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/css/base.css';
import { GET, POST, PUT, DELETE } from '@/util/Axios.js'
import router from '@/router/index.js'
import store from '@/store/index.js'
import { Debounce, Throttle } from '@/util/Throttle_Debounce.js'
import _initWebSocket from '@/util/Socket.js'
import _initFilter from '@/util/filter.js'

Vue.use(elementUI)

// Vue 原型上配置常用的函数
// 在types文件 .d.ts 进行类型说明 
Vue.prototype.$Throttle = Throttle;
Vue.prototype.$Debounce = Debounce;
Vue.prototype.$GET = GET;
Vue.prototype.$POST = POST;
Vue.prototype.$PUT = PUT;
Vue.prototype.$DELETE = DELETE;
Vue.prototype.$_initWebSocket = _initWebSocket
Vue.prototype.$socketEventMessageEmitter = require('@/util/Socket').socketEventMessageEmitter
Vue.prototype.$socket_send = require('@/util/Socket')._send_huily
Vue.prototype.$baseURL = require('@/config/data.config').baseURL
Vue.prototype.$IsAdmin = require('@/util/RightsManage').IsAdmin
Vue.config.productionTip = false
_initFilter(Vue)
new Vue({
    render: h => h(App),
    store,
    router,
    beforeCreate() {
        Vue.prototype.$BUS = this
    }
}).$mount('#app');